<%-- 
    Document   : Statistics_Mark
    Created on : Oct 22, 2013, 5:56:19 AM
    Author     : ZERO
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>JSP Page</title>
        </head>
        <body>
            <h:form>
                <h1><h:outputText value="Statistics"/></h1>                                      
                <h:commandButton action="#{staff.classByStaffID()}" value="Class"></h:commandButton>
                <br/><h:outputLabel value="Class name:" for="class name"></h:outputLabel> 
                <c:forEach var="cl" items="#{staff.classes}" >
                    <br/> <h:commandLink action="#{staff.assignmentByClassID(cl.classid)}" value="#{cl.classname}"></h:commandLink>
                </c:forEach>
                <br/><h:outputLabel value="Assignment Grading:" for="assignment grading"></h:outputLabel> 
                <c:forEach var="as" items="#{staff.as}" >
                    <br/> <h:commandLink action="#{staff.markByAssignmentID(as.assignmentid)}" value="#{as.assignmentid}"></h:commandLink>
                    Discipline name:<h:outputText value="#{as.disciplinename}"></h:outputText>
                </c:forEach>
                <br/><h:outputLabel value="No Scoring:" for="no scoring"></h:outputLabel> 
                <c:forEach var="as1" items="#{staff.as1}" >
                    <br/> <h:commandLink action="#{staff.submitOfAssignmentByAssignmentID(as1.assignmentid)}" value="#{as1.assignmentid}"></h:commandLink>
                    Discipline name:<h:outputText value="#{as1.disciplinename}"></h:outputText>
                </c:forEach>
            </h:form>
            &nbsp;&nbsp;&nbsp;&nbsp;<h:form>
                <h:outputLabel value="student" for="student"></h:outputLabel>
                    <br/>
                <h:dataTable border="1" var="mark" value="#{staff.soas}" >
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Student ID"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.studentid}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="EmailName"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.emailname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Name"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.firstname}"></h:outputText>&nbsp;
                        <h:outputText value="#{mark.lastname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Postday"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{student.postday}">
                            <f:convertDateTime pattern="dd-MM-yyyy"></f:convertDateTime>
                        </h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Mark"></h:outputLabel>
                        </f:facet>
                        <h:inputText value="#{staff.mark}"></h:inputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Update"></h:outputLabel>
                        </f:facet>
                        <h:commandLink action="#{staff.enterMark(mark.assignmentid, mark.studentid)}" value="Update"></h:commandLink>
                    </h:column>
                </h:dataTable>
                <h:outputLabel value="Good student:" for="good student"></h:outputLabel>&nbsp;
                <h:outputText value="#{staff.totalg}"></h:outputText>&nbsp;
                <h:outputLabel value="student" for="student"></h:outputLabel>
                    <br/>
                <h:dataTable border="1" var="mark" value="#{staff.msg}" >
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Student ID"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.studentid}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="EmailName"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.emailname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Name"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.firstname}"></h:outputText>&nbsp;
                        <h:outputText value="#{mark.lastname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Mark"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.mark}"></h:outputText>
                    </h:column>
                </h:dataTable>
                <br/><h:outputLabel value="Quite  student:" for="quite  student"></h:outputLabel>&nbsp;
                <h:outputText value="#{staff.totalk}"></h:outputText>&nbsp;
                <h:outputLabel value="student" for="student"></h:outputLabel>
                    <br/>
                <h:dataTable border="1" var="mark" value="#{staff.msk}" >
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Student ID"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.studentid}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="EmailName"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.emailname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Name"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.firstname}"></h:outputText>&nbsp;
                        <h:outputText value="#{mark.lastname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Mark"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.mark}"></h:outputText>
                    </h:column>
                </h:dataTable>
                <br/><h:outputLabel value="Poor academic student:" for="poor academic student"></h:outputLabel>
                <h:outputText value="#{staff.totaltb}"></h:outputText>&nbsp;
                <h:outputLabel value="student" for="student"></h:outputLabel>
                    <br/>
                <h:dataTable border="1" var="mark" value="#{staff.mstb}" >
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Student ID"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.studentid}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="EmailName"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.emailname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Name"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.firstname}"></h:outputText>&nbsp;
                        <h:outputText value="#{mark.lastname}"></h:outputText>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel value="Mark"></h:outputLabel>
                        </f:facet>
                        <h:outputText value="#{mark.mark}"></h:outputText>
                    </h:column>
                </h:dataTable>
            </h:form>
        </body>
    </html>
</f:view>
